import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { NgZorroAntdModule } from 'ng-zorro-antd';
import { RouterModule } from '@angular/router';
import { FormsModule } from '@angular/forms';
import { DrawingsComponent } from './drawings.component';
import { DrawingsService } from '../../../services/project/drawings/drawings.service';
import { PipeModule } from '../../../common/pipe/pipe.module';
import { ZzjFileUploaderModule } from '@zzj/nag-file-uploader';
import { NgxFlowModule, FlowInjectionToken } from '@flowjs/ngx-flow';
import Flow from '@flowjs/flow.js';
import { ViewComponent } from './view/view.component';
import { ModelComModule } from '../../../components/model-panel/component.module';
import { FileUploaderModule } from '../../../components/file-uploader/file-uploader.module';

@NgModule({
  imports: [
    CommonModule,
    NgZorroAntdModule,
    FormsModule,
    PipeModule,
    NgxFlowModule,
    FileUploaderModule,
    ModelComModule,
    RouterModule.forChild([
      { path: 'drawings', component: DrawingsComponent },
      { path: 'view', component: ViewComponent }
    ])
  ],
  declarations: [DrawingsComponent, ViewComponent],
  providers: [
    DrawingsService,
    {
      provide: FlowInjectionToken,
      useValue: Flow
    }
  ]
})
export class DrawingsModule { }
